package net.pimpas.web.jsf.components.simplemenu.impl;

import net.pimpas.web.jsf.components.simplemenu.SimpleMenuButton;
import net.pimpas.web.jsf.components.simplemenu.SimpleMenuElement;

public class SimpleMenuButtonImpl extends SimpleMenuImpl implements SimpleMenuButton {

	public SimpleMenuButtonImpl(String name, String label, String action, boolean disabled, String tooltip) {
		super(name);
		this.setLabel(label);
		this.setDisabled(disabled);
		this.setTooltip(tooltip);
	}
	
	public SimpleMenuButtonImpl(String name, SimpleMenuElement element) {
		super(name);
		this.setLabel(element.getLabel());
		this.setIcon(element.getIcon());
		this.setIconHover(element.getIconHover());
		this.setAction(element.getAction());
		this.setParent(element.getParent());
		this.setTooltip(element.getTooltip());
		this.setDisabled(element.isDisabled());
	}

	private static final long serialVersionUID = -5217189265424941070L;

}